﻿using Ewell.Interface.Common.Model.Constant;
using Ewell.Interface.Common.Model.GateWay.Dto.Oauth;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ewell.Interface.Common.Model.GateWay.GateWayUriInfo
{
    public class HisOauthServe : GateWayUri
    {
        public override string url => "dubbo/cc.ewell.his.oauth.service.inter.dubbo.external.HisOauthServe";
        public GateWayMethod savePayOrder => new SavePayOrder(url);
        public GateWayMethod saveRefundOrderPro => new SaveRefundOrderPro(url);
        public GateWayMethod selectOauthPayOrderByDomain => new SelectOauthPayOrderByDomain(url);
    }

    public class SavePayOrder : GateWayMethod
    {
        public SavePayOrder(string baseUrl) : base(baseUrl)
        {
        }

        public override string methodName => "savePayOrder";

        public override string paramClass => "cc.ewell.his.oauth.upon.req.OauthPayOrderReq";

        public override DubboParamType paramType => DubboParamType.defaultParam;

        public override Type requestParamType => typeof(OauthPayOrderReq);

        public override Type responseParamType => typeof(object);
    }

    public class SaveRefundOrderPro : GateWayMethod
    {
        public SaveRefundOrderPro(string baseUrl) : base(baseUrl)
        {
        }

        public override string methodName => "saveRefundOrderPro";

        public override string paramClass => "cc.ewell.his.oauth.upon.req.refund.OauthReq";

        public override DubboParamType paramType => DubboParamType.defaultParam;

        public override Type requestParamType => typeof(OauthReq);

        public override Type responseParamType => typeof(SaveRefundOrderResp);
    }

    public class SelectOauthPayOrderByDomain : GateWayMethod
    {
        public SelectOauthPayOrderByDomain(string baseUrl) : base(baseUrl)
        {
        }

        public override string methodName => "selectOauthPayOrderByDomain";

        public override string paramClass => "cc.ewell.his.oauth.upon.req.OauthPayOrderReq";

        public override DubboParamType paramType => DubboParamType.defaultParam;

        public override Type requestParamType => typeof(OauthPayOrderReq);

        public override Type responseParamType => typeof(OauthPayOrderResp);
    }
}
